<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    const arr=['apple','pear','orange'];
     const a =arr.find((i)  =>  i.indexOf('g')>0 );
     alert(a)
</script>
</body>
</html>